# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-proc-processtable
pkgver=0.636
pkgrel=1
pkgdesc="Provides a consistent interface to process table information."
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/Proc-ProcessTable/"
license=('PerlArtistic')
depends=('perl')
provides=('perl-proc-killall' 'perl-proc-killfam' 'perl-proc-processtable-process')
options=(!emptydirs)
source=("https://search.cpan.org/CPAN/authors/id/J/JW/JWB/Proc-ProcessTable-$pkgver.tar.gz")
sha512sums=('9678c9bd4bf70c4188265824fbc79e2f951f9e3722733172838fe20748b6938babd5a4db44bb1b6c8c59b7718ade634b3f25a462a82291dc2edaa620baa436cd')

build() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"
  make test
}

package() {
  cd "$srcdir/Proc-ProcessTable-$pkgver"

  make install DESTDIR="${pkgdir}"
  find "${pkgdir}" -name perllocal.pod -delete
  find "${pkgdir}" -name .packlist -delete
}
